<?php
@@ini_set('session.bug_compat_warn', 0);
@@ini_set('session.bug_compat_42', 0);

session_start() ;
if(!isset($_SESSION["login"]) || $_SESSION["login"] == "")
{   
  header("Location: index.php?error=4") ;
}

?>

<html>
<head>
<title>Administration</title>
 <link rel="stylesheet" type="text/css" href="style.css" > 

<!--[if IE]>
     <style type="text/css">
         .div_fix {
             position: relative;
             height: 400px;
             width: 8016px;
             overflow-y: scroll;
             overflow-x: hidden;
             border: solid #B9121B;
             border-width: 0px 0px 1px 0px;
         }
          .div_fix2 {
             position: relative;
             height: 35px;
             width: 8016px;
             left:7750px;
           
         }
         .table_fix {
             border-width: 1px 1px 1px 1px;
             border: solid #B9121B;
	         border-width: 1px 1px 1px 1px;
	         width: 8000px;
         }
         .thead_tr_fix {
             position: absolute;
             top: expression(this.offsetParent.scrollTop);
             background-color: #B9121B;
         	 color: #FFFFFF;
         	 border-width: 1px 1px 1px 1px;
         	 padding: 4px;
         }
         .tbody_fix {
             height: auto;
         }
         
         .td_fix {
             padding: 29px 4px 4px 4px;
           padding: 4px;
	         border-top:1px #B9121B solid;
			border-left:1px #B9121B solid;
			border-bottom:1px #B9121B solid;
			border-right:1px #B9121B solid;
         }
          .th_fix{
         border: solid #B9121B;
         border-width: 1px 0px 0px 1px;
         padding: 4px;
     } 
     
     </style>
 <![endif]--> 
</head>

<body>
<?php require("menu.php");
require("fonctions.php");
$code=$_GET["error"];
$codesap = $_SESSION["codesap"];
$action = $_GET["action"];
$id_interv=$_POST["id_interv"];
$nom_dis=$_POST["nom_dis"];
$code_sap=$_POST["code_sap"];
$filtrer = $_POST["filtrer"];
$nps_rt=$_POST["nps_rt"];
$statut=$_POST["statut"];
$q11=$_POST["q11"];
$groupe1=$_POST["groupe1"];
$vague = $_POST["vague"];
$retour = $_GET["retour"];
$groupe = $_GET["groupe"];
if($retour=="ok"){
	$code_sap = $_GET["code_sap"];
	$groupe1 = $_GET["groupe"];
	
}
?>
<form action="<?php echo($_SERVER['PHP_SELF']); ?>?cur=8" method="post" id="chg_enq" name="chg_f">

<table align=center class="tab_dis" >
<tr>
<td>ID_INTERVIEW</td>
	<td>
			<select name="id_interv" onchange="this.form.submit()">
			<option value="0"></option>
	<?php 
	if($nom_dis>0){
		 $sql1="select id_interv from data_temp where code_sap='$nom_dis' order by id_interv asc";
	}elseif($id_interv>0){
		 $sql1="select id_interv from data_temp where id_interv='$id_interv' order by id_interv asc";
	}elseif($code_sap>0){
		 $sql1="select id_interv from data_temp where code_sap='$code_sap' order by id_interv asc";
	}elseif($groupe1!="0" && $groupe1!=""){
		 $sql1="select id_interv from data_temp where groupe='$groupe1' order by id_interv asc";
	}elseif($statut!="0" && $statut!=""){
		 $sql1="select id_interv from data_temp where statut='$statut' order by id_interv asc";
	}
	else{
	
		$sql1="select id_interv from data_temp order by id_interv asc";
	}
	
	$res1=mysql_query($sql1);
	while($r1=mysql_fetch_object($res1)){
	
		?>
	<option value="<?php echo $r1->id_interv;?>" <?php if($id_interv==$r1->id_interv) {echo "selected";}?>><?php echo $r1->id_interv;?></option>
	<?php }?>
	</select>
	</td>
<td>ETABLISSEMENT</td>
	<td>
			<select name="nom_dis" onchange="this.form.submit()">
			<option value="0"></option>
	<?php 
	if($id_interv>0){
	
		 $sql2="select distinct(code_sap)as code_sap,distributeur from data_temp where id_interv='$id_interv' order by code_sap asc";
	}elseif($nom_dis>0){
		  $sql2="select distinct(code_sap),distributeur from data_temp where code_sap='$nom_dis' order by code_sap";
	}elseif($code_sap>0){
		 $sql2="select distinct(code_sap),distributeur from data_temp where code_sap='$code_sap' order by code_sap";
		 $nom_dis=$code_sap;
	}elseif($groupe1!="0" && $groupe1!=""){
		 $sql2="select distinct(code_sap),distributeur from data_temp where groupe='$groupe1' order by code_sap";
	}elseif($statut!="0" && $statut!=""){
		 $sql2="select distinct(code_sap),distributeur from data_temp where statut='$statut' order by code_sap";
	}	
	else{
		$sql2="select distinct(code_sap) as code_sap,distributeur from data_temp order by code_sap asc";
	}
	
	$res2=mysql_query($sql2);
	while($r2=mysql_fetch_object($res2)){
	?>
	<option value="<?php echo $r2->code_sap;?>" <?php if($r2->code_sap==$nom_dis){echo "selected";}?>><?php echo $r2->distributeur;?></option>
	<?php }?>
	</select>
	</td>
<td>Code SIGA</td><td><select name="code_sap" onchange="this.form.submit()">
	<option value="0"></option>
	<?php 
	if($id_interv>0){
		 $sql5="select distinct(code_sap) from data_temp where id_interv='$id_interv' order by code_sap";
	}elseif($nom_dis>0){
		 $sql5="select  distinct(code_sap) from data_temp where code_sap='$nom_dis' order by code_sap";
		
	}elseif($code_sap>0){
		 $sql5="select  distinct(code_sap) from data_temp where code_sap='$code_sap' order by code_sap";
		 $code_sap=$nom_dis;
	}elseif($groupe1!="0" && $groupe1!=""){
		   $sql5="select  distinct(code_sap) from data_temp where groupe='$groupe1' order by code_sap";
	}elseif($statut!="0" && $statut!=""){
		$sql5="select  distinct(code_sap) from data_temp where statut='$statut' order by code_sap";
	}		
	else{
	
		$sql5="select distinct(code_sap) from data_temp order by code_sap";
	}
	
	$res5=mysql_query($sql5);
	while($r5=mysql_fetch_object($res5)){
	?>
	<option value="<?php echo $r5->code_sap;?>" <?php if($r5->code_sap==$code_sap){echo "selected";}?>><?php echo $r5->code_sap;?></option>
	<?php }?>
	</select>
	</td>
	
	<td>Vague</td>
<td><select name="vague" onchange="this.form.submit()">
	<option value="0"></option>
	<?php 
	if($id_interv>0){
	$sql5="select distinct vague from data_temp where id_interv='$id_interv' order by vague";
	}elseif($nom_dis>0){
		$sql5="select  distinct(vague) from data_temp where code_sap='$nom_dis' order by code_sap";
		$code_sap=$nom_dis;
	}elseif($code_sap>0){
		$sql5="select distinct(vague) from data_temp where code_sap='$code_sap' order by vague";
	}elseif($vague!=0){
		$sql5="select distinct(vague) from data_temp where vague='$vague' order by vague";
	}elseif($groupe1!="0" && $groupe1!=""){
		 $sql5="select distinct(vague) from data_temp where groupe='$groupe1' order by vague";
	}elseif($statut!="0" && $statut!=""){
		$sql5="select distinct(vague) from data_temp where statut='$statut' order by vague";
	}	
	else{
		$sql5="select descrip as vague from vagues_camp where statut='EN_COURS'";
	}
	$res5=mysql_query($sql5);
	while($r5=mysql_fetch_object($res5)){
	?>
	<option value="<?php echo $r5->vague;?>" <?php if($r5->vague=="$vague") echo "selected";?>><?php echo $r5->vague;?></option>
	<?php }?>
	</select></td>
</tr>

<tr>

	
	<td>GROUPE</td>
	<td>	<select name="groupe1" onchange="this.form.submit()">
	<option value="0"></option>
	<?php 
	if($id_interv>0){
		$sql4="select  groupe from data_temp where id_interv='$id_interv' order by groupe";
	}elseif($nom_dis>0){
		 $sql4="select  distinct(groupe) from data_temp where code_sap='$nom_dis' order by code_sap";
		
	}elseif($code_sap>0){
		  $sql4="select  distinct(groupe) from data_temp where code_sap='$code_sap' order by code_sap";
	}elseif($groupe1!="0" && $groupe1!=""){
		 $sql4="select  distinct(groupe) from data_temp where groupe='$groupe1' order by code_sap";
	}elseif($statut!="0" && $statut!=""){
		 $sql4="select  distinct(groupe) from data_temp where statut='$statut' order by code_sap";
	}	
	else{
		$sql4="select distinct(groupe) from distributeurs order by groupe";
	}
	$res4=mysql_query($sql4);
	while($r4=mysql_fetch_object($res4)){
	?>
	<option value="<?php echo $r4->groupe;?>" <?php if($r4->groupe=="$groupe1"){echo "selected";}?>><?php echo $r4->groupe;?></option>
	
	
	<?php }?>
	</select></td>
	
	<td>NPS RT</td><td><select name="nps_rt" onchange="this.form.submit()"><option></option>
	<?php 
	if($id_interv>0){
		$sql6="select distinct nps_rt from data_temp  where id_interv='$id_interv' order by nps_rt asc";
	}elseif($code_sap>0){
		$sql6="select distinct nps_rt from data_temp  where code_sap='$code_sap' order by nps_rt asc";
	}elseif($nom_dis>0){
		 $sql6="select distinct(nps_rt) from data_temp  where code_sap='$nom_dis' order by nps_rt asc";
	}elseif($groupe1!="0" && $groupe1!=""){
		 $sql6="select distinct(nps_rt) from data_temp  where groupe='$groupe1' order by nps_rt asc";
	}elseif($statut!="0" && $statut!=""){
		 $sql6="select distinct(nps_rt) from data_temp  where statut='$statut' order by nps_rt asc";
	}
	else{
		$sql6="select distinct nps_rt from data_temp order by nps_rt asc";	
	}
	echo $sql6;
	$res6=mysql_query($sql6);
	while($r6=mysql_fetch_object($res6)){
	?>
<option value="<?php echo $r6->nps_rt;?>" <?php if($r6->nps_rt=="$nps_rt"){echo "selected";}?>><?php echo $r6->nps_rt;?></option>
<?php }?>
</select></td>
<td >Statut</td>
	<td ><select name="statut" onchange="this.form.submit()"><option value="0" ></option>
	<?php 
	if($id_interv>0){
		$sql6="select distinct(statut) from data_temp where id_interv='$id_interv' order by statut asc";
	}elseif($code_sap>0){
			 $sql6="select distinct(statut) from data_temp where code_sap='$code_sap' order by statut asc";
	}elseif($nom_dis>0){
		  	$sql6="select distinct(statut) from data_temp where code_sap='$nom_dis' order by statut asc";
		
	}elseif($groupe1!="0" && $groupe1!=""){
		$sql6="select distinct(statut) from data_temp where groupe='$groupe1' order by statut asc";
	}elseif(!empty($statut)){
		$val = substr($statut,0,14);
		$sql6="select distinct(statut) from data_temp where statut like '%$val%' order by statut asc";
	}else{
			$sql6="select distinct statut from data_temp order by statut asc";	
	}
	//echo $sql6;
	$res6=mysql_query($sql6);
	while($r6=mysql_fetch_object($res6)){
	
		?>
<option value="<?php echo $r6->statut;?>" <?php if(str_replace(" ","",substr($r6->statut,0,14))==str_replace(" ","",substr($statut,0,14))){echo"selected";}?>><?php echo $r6->statut;?></option>
<?php }?>

</select></td>
	
<td>Bon du 1er coup</td><td><select name="q11" onchange="this.form.submit()"><option></option>
	<?php 
	if($id_interv>0){
		$sql6="select q11 from data_temp where id_interv='$id_interv' order by statut asc";
	}elseif($nom_dis>0){
		  $sql6="select distinct(q11) from data_temp where code_sap='$nom_dis' order by statut asc";
		
	}elseif($groupe1!="0" && $groupe1!=""){
		  $sql6="select distinct(q11) from data_temp where groupe='$groupe1' order by statut asc";
	}elseif($statut!="0" && $statut!=""){
		 $sql6="select distinct(q11) from data_temp where statut='$statut' order by statut asc";
	}
	else{
			$sql6="select distinct q11 from data_temp order by statut asc";	
	}
	
	$res6=mysql_query($sql6);
	while($r6=mysql_fetch_object($res6)){
	?>
<option value="<?php echo $r6->q11;?>" <?php if($r6->q11=="$q11"){echo "selected";} ?>><?php echo $r6->q11;?></option>
<?php }?>
</select></td>
	</tr>
<tr>
	<td colspan="6" align=center><input type="submit" value="Valider" name="filtrer"></td>
</tr>
<tr>
	<td colspan=2><a class="bouton" href="rt_interv.php?cur=8">R&eacute;initialiser</a></td>
	<td colspan=6 align=right><a class="bouton" href="rt_interv.php?groupe=all&cur=8">Lignes argument&eacute;es par les &eacute;tablissements</a></td>
</tr>

</table>
</form>

<p class="titre">Exporter les donn&eacute;es de la base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="rt_base_csv.php">T&eacute;l&eacute;charger la base </a></p>

<?php 
$nom_dis = $_POST["nom_dis"];
$groupe1 = $_POST["groupe1"];

?>
<form action="controler.php?action=modif_arg_rt" method=post>
<input type="hidden" name="codesap" value="<?php echo $codesap;?>">	
<input type="hidden" name="groupe" value="<?php echo $groupe;?>">

<?php 

if($retour=="ok" && $groupe!="all"){
//$nom_dis = $_GET["code_sap"];

	$sql = "select * from data_temp where 1=1 and vague in(select descrip from vagues_camp where statut='EN_COURS') ";
		$where = "";
	if($id_interv>0){
			$colon="id_interv";
           	$where.=" and $colon='$id_interv'";
		}
if($nom_dis>0){
			$colon="code_sap";
           	$where.=" and $colon='$nom_dis'";
		}
if($code_sap>0){
			$colon="code_sap";
           	$where.=" and $colon='$code_sap'";
		}
if(!empty($statut)){
			$colon="statut";
			$val = substr($statut,0,14);        	
			$where.=" and $colon like '%$val%'";
		}
if($nps_rt!="0" && $nps_rt!=""){
			$colon="nps_rt";
           	$where.=" and $colon='$nps_rt'";
		}
if($q11!="0" && $q11!=""){
			$colon="q11";
           	$where.=" and $colon='$q11'";
		}
if($groupe!="0" && $groupe!=""){
			$colon="groupe";
           	$where.=" and $colon='$groupe'";
		}				
		$sql.=$where;
			//echo $sql;
		$res = mysql_query($sql);
}


if(isset($groupe)or isset($filtrer)){
if($groupe=="all"){
	$sql="select * from data_temp where arg_res<>'' order by id_interv desc";
	
	$res = mysql_query($sql);
}

if(isset($filtrer)){
	
	$sql = "select * from data_temp where 1=1 and vague in(select descrip from vagues_camp where statut='EN_COURS')  ";
		$where = "";
	if($id_interv>0){
			$colon="id_interv";
           	$where.=" and $colon='$id_interv'";
		}
if($nom_dis>0){
			$colon="code_sap";
           	$where.=" and $colon='$nom_dis'";
		}
if($code_sap>0){
			$colon="code_sap";
           	$where.=" or $colon='$code_sap'";
		}
if(!empty($statut)){
			$colon="statut";		
			$val = substr($statut,0,14);        	
			$where.=" and $colon like '%$val%'";
		}
if($nps_rt!="0" && $nps_rt!=""){
			$colon="nps_rt";
           	$where.=" and $colon='$nps_rt'";
		}
if($q11!="0" && $q11!=""){
			$colon="q11";
           	$where.=" and $colon='$q11'";
		}
if($groupe1!="0" && $groupe1!=""){
			$colon="groupe";
           	$where.=" and $colon='$groupe1'";
		}				
		$sql.=$where;
			//echo $sql;
		$res = mysql_query($sql);
}

?>
<div class="div_fix2">
<?php if(($groupe=="all") or (isset($filtrer))){?>
<input type="submit" value="Valider la saisie !">
<?php }?>
</div>
<div class="div_fix">
<table class="table_fix" >
	<thead class="thead_fix">
<tr class="thead_tr_fix">
	<th class="th_fix">ID_INTERV</th>
	<th class="th_fix">ID_LVDC</th>
	<th class="th_fix">DATE_INTERVIEW</th>
	<th class="th_fix">CIBLE</th>
	<th class="th_fix">VAGUE&nbsp;&nbsp;&nbsp;&nbsp;</th>
	<th class="th_fix">TYPE DE FACTURE</th>
	<th class="th_fix">CODESIGA</th>
	<th class="th_fix">ETABLISSEMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
	<th class="th_fix">GROUPE</th>	
	<th class="th_fix">raison_soc_fich</th>
	<th class="th_fix">maj_nom_ent</th>
	<th class="th_fix">adresse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
	<th class="th_fix">code_postal</th>
	<th class="th_fix">ville</th>
	<th class="th_fix">t&eacute;l&eacute;phone</th>
	<th class="th_fix">nom_interv&nbsp;&nbsp;</th>
	<th class="th_fix">date_fact_interv</th>
	<th class="th_fix">v&eacute;hicule</th>
	<th class="th_fix">VIN</th>
	<th class="th_fix">immatricul</th>
	<th class="th_fix">num_fact_dossier</th>
	<th class="th_fix">Q11.Bon du 1er coup : avez-vous &eacute;t&eacute; oblig&eacute; de ramener votre v&eacute;hicule &agrave; l&#146;atelier ?</th>
	<th class="th_fix">Q12.Annonce r&eacute;paration provisoire ?</th>
	<th class="th_fix">Q13.Raison retour atelier</th>
	<th class="th_fix">Q14.Recommanderiez-vous cet atelier &agrave; votre entourage professionnel ?</th>
	<th class="th_fix">Q15.Note de Recommandation</th>
	<th class="th_fix">NPS RT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
	<th class="th_fix">Q16.Explication de la non recommandation</th>
	<th class="th_fix">Q00.Quelle est votre fonction ? </th>
	<th class="th_fix">Q01. Satisfaction globale vis-&agrave;-vis des prestations </th>
	<th class="th_fix">Q02. Votre d&eacute;pannage a-t-il &eacute;t&eacute; effectu&eacute;�</th>
	<th class="th_fix">Q03. Prestation globale du d&eacute;panneur</th>
	<th class="th_fix">Q04. Raisons d'insatisfaction D&eacute;pannage</th>
	<th class="th_fix">Q05. Prestation du r&eacute;ceptionnaire</th>
	<th class="th_fix">Q06.Raisons d'insatisfaction R&eacute;ceptionnaire</th>
	<th class="th_fix">Q07. Prestation de l&#146;atelier (r�paration)</th>
	<th class="th_fix">Q08.Raisons d'insatisfaction Atelier</th>
	<th class="th_fix">Q09.Le montant des r&eacute;parations factur&eacute;es, correspond t-il aux devis annonc&eacute;s ?</th>
	<th class="th_fix">Q10. Raisons d&#146;insatisfaction Facture</th>
	<th class="th_fix">Nombre d&#146;insatisfaction durant l&#146;interview</th>
	<th class="th_fix">Alerte Recommandation</th>
	<th class="th_fix">Argumentaire r&eacute;seau</th>
	<th class="th_fix">Argumentaire RT </th>
	<th class="th_fix">D&eacute;cision RT</th>
	<th class="th_fix">Statut</th>
	<th class="th_fix">Demande de Re-satisfaction</th>

</tr>
</thead>
<tbody class="tbody_fix">
<tr>
	<td height="100px" ></td>
</tr>
<?php while($r = mysql_fetch_object($res)){	?>

<tr>

	<td  class="td_fix"><?php echo $r->id_interv;?></td>
	<td  class="td_fix"><?php echo $r->id_lvdc;?></td>
	<td  class="td_fix"><?php echo $r->date_interv;?></td>
	<td  class="td_fix"><?php echo $r->cibles;?></td>
	<td  class="td_fix"><?php echo $r->vague;?></td>
	<td  class="td_fix"><?php echo $r->type_facture;?></td>
	<td  class="td_fix"><?php echo $r->code_sap;?></td>
	<td  class="td_fix"><?php echo $r->distributeur;?></td>
	<td  class="td_fix"><?php echo $r->groupe;?></td>	
	<td  class="td_fix"><?php echo $r->rais_soc_fich;?></td>
	<td  class="td_fix"><?php echo $r->maj_nom_ent;?></td>
	<td  class="td_fix"><?php echo $r->adresse;?></td>
	<td  class="td_fix"><?php echo $r->code_postal;?></td>
	<td  class="td_fix"><?php echo $r->ville;?></td>
	<td  class="td_fix"><?php echo $r->telephone;?></td>
	<td  class="td_fix"><?php echo $r->nom_interv;?></td>
	<td  class="td_fix"><?php echo $r->date_fact_interv;?></td>
	<td  class="td_fix"><?php echo $r->vehicule;?></td>
	<td  class="td_fix"><?php echo $r->vignette;?></td>
	<td  class="td_fix"><?php echo $r->immatricul;?></td>
	<td  class="td_fix"><?php echo $r->num_fact_dossier;?></td>
	<td  class="td_fix"><?php echo $r->q11;?></td>
	<td  class="td_fix"><?php echo $r->q12;?></td>
	<td  class="td_fix"><?php echo $r->q13;?></td>
	<td  class="td_fix"><?php echo $r->q14;?></td>
	<td  class="<?php echo $val= getCouleurRecom($r->q15)?>"><?php echo $r->q15;?></td>
	<td  class="td_fix"><?php echo $r->nps_rt;?></td>
	<td  class="td_fix"><?php echo $r->q16;?></td>
	<td  class="td_fix"><?php echo $r->q0;?></td>
	<td  class="td_fix"><?php echo $r->q1;?></td>
	<td  class="td_fix"><?php echo $r->q2;?></td>
	<td  class="td_fix"><?php echo $r->q3;?></td>
	<td  class="td_fix"><?php echo $r->q4;?></td>
	<td  class="td_fix"><?php echo $r->q5;?></td>
	<td  class="td_fix"><?php echo $r->q6;?></td>
	<td  class="td_fix"><?php echo $r->q7;?></td>
	<td  class="td_fix"><?php echo $r->q8;?></td>
	<td  class="td_fix"><?php echo $r->q9;?></td>
	<td  class="td_fix"><?php echo $r->q10;?></td>
	<td  class="td_fix"><?php echo $r->nb_insatisfact_interv;?></td>
	<td  class="td_fix"><?php echo $r->alerte_recom;?> </td>	
	<td  class="td_fix">
	<textarea cols=35 rows=10 name="arg_res" readonly><?php echo $r->arg_res;?></textarea>
	<input type="hidden" name="arg_res_<?php echo $r->id_interv;?><?php echo $r->id_lvdc;?>" value="<?php echo $r->arg_res; ?>">
	
	</td>
	<td  class="td_fix">
	<textarea cols=35 rows=10 name="arg_rt_<?php echo $r->id_interv;?><?php echo $r->id_lvdc; ?>" ><?php echo $r->arg_rt;?></textarea>
	 </td>
	<td  class="td_fix">
	<select name="decision_<?php echo $r->id_interv; ?>">
	<option value=0 <?php if($r->decision==0) echo "selected"; ?>></option>
		<option value="1" <?php if($r->decision==1) echo "selected"; ?>>R&eacute;affectation sur un autre &eacute;tablissement</option>
		<option value="2" <?php if($r->decision==2) echo "selected"; ?>>Basculer la note � 8</option>
		<option value="3" <?php if($r->decision==3) echo "selected"; ?>>Neutraliser le retour</option>
		<option value="4" <?php if($r->decision==4) echo "selected"; ?>>Neutraliser le retour + Basculer la note � 8</option>
		<option value="5" <?php if($r->decision==5) echo "selected"; ?>>Refus</option>
		<option value="6" <?php if($r->decision==6) echo "selected"; ?>>Annulation interv</option>
		
	</select>
	</td>
	<td  class="<?php echo $val= getCouleurStatut($r->decision);?>"><?php echo $statut = getStatutInterv($r->id_interv);?></td>
	<td  class="td_fix"><select name="demande_re_satifact_<?php echo $r->id_interv; ?>">
	<option value=0 <?php if($r->demande_re_satifact==0) echo "selected"; ?>></option>
		<option value="1" <?php if($r->demande_re_satifact=="1") echo "selected"; ?>>Oui</option>
	</select></td>
	<?php if($groupe=="all"){?>
<input type="hidden" name="groupe" value="all">
<input type="hidden" name="id_lvdc_<?php echo $r->id_interv; ?><?php echo $r->id_lvdc; ?>" value="<?php echo $r->id_lvdc; ?>">

<?php }else{?>


<?php }?>
<input type="hidden" name="code_sap" value="<?php echo $r->code_sap;?>">
</tr>

<?php }

} ?>
<input type="hidden" name="code_sap" value="<?php echo $code_sap;?>">
<input type="hidden" name="statut" value="<?php echo $statut;?>">
<input type="hidden" name="nps_rt" value="<?php echo $nps_rt;?>">
<input type="hidden" name="q11" value="<?php echo $q11;?>">
<input type="hidden" name="groupe1" value="<?php echo $groupe1?>">
<input type="hidden" name="id_interv" value="<?php echo $id_interv?>">
</tbody>
</table>
</div>
<?php if(($groupe=="all") or (isset($filtrer))){?>
<table class="">
<tr>
<td colspan="2" align=center><input type="submit" value="Valider la saisie !"> </td>
</tr>
</table>
<?php }else{?>

<?php }?>
</form>

</body>

</html>
